<template>
  <div class="my">
   <Header>
      <template slot="left">
        <p></p>
      </template>
      <template slot="center"><p>我的</p></template>
      <template slot="right"><p></p></template>
    </Header>
    <main>
      <div class="my_main">
        <dl class="my_main_top">
          <dt>
            <img src="../../img/tx.jpg" alt="">
          </dt>
          <dd>
            <p>昵称</p>
            <p>绑定手机号</p>
          </dd>
        </dl>
        <div class="my_main_bottom">
          <div class="item"  @click="jump('/layout/yue')">
            <span>234.00</span>
            <p>余额</p>
          </div>
          <div class="item">
            <span>0</span>
            <p>积分</p>
          </div>
          <div class="item">
            <span>4</span>
            <p>优惠券</p>
          </div>
        </div>
        <span class="qd">签到</span>
      </div>
      <div class="dd_center" @click="$router.push('/orderlist')">
        <div class="dd_center_top">
          <h2>订单中心</h2>
          <svg-icon iconClass="right"/>
        </div>
        <div class="dd_center_bottom">
          <dl>
            <dt>
              <svg-icon iconClass="waitpay"/>
            </dt>
            <dd>待付款</dd>
          </dl>
          <dl>
            <dt><svg-icon iconClass="waitsend"/></dt>
            <dd>待发货</dd>
          </dl>
          <dl>
            <dt><svg-icon iconClass="waitsend"/></dt>
            <dd>待收货</dd>
          </dl>
          <dl>
            <dt><svg-icon iconClass="waitsay"/></dt>
            <dd>待评价</dd>
          </dl>
          <dl>
            <dt><svg-icon iconClass="waitsay"/></dt>
            <dd>售后/退款</dd>
          </dl>
        </div>
      </div>
      <div class="img">
        <img src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1808780692,2150998504&fm=26&gp=0.jpg" alt="">
      </div>
      <div class="item_router">
        <dl @click="jump('/layout/yue')">
          <dt>
            <svg-icon iconClass="yue"></svg-icon>
          </dt>
          <dd>
            <span>我的余额</span>
            <svg-icon iconClass="right"/>
          </dd>
        </dl>
      </div>
      <div class="item_router">
        <dl>
          <dt>
            <svg-icon iconClass="moneybag"></svg-icon>
          </dt>
          <dd>
            <span  @click="$router.push('/cardlist')">我的卡包</span>
            <svg-icon iconClass="right"/>
          </dd>
        </dl>
      </div>
      <div class="item_router">
        <dl>
          <dt>
            <svg-icon iconClass="moneybag"></svg-icon>
          </dt>
          <dd>
            <span  @click="$router.push('/shopticket')">我的优惠券</span>
            <svg-icon iconClass="right"/>
          </dd>
        </dl>
      </div>
      <div class="item_router">
        <dl>
          <dt>
            <svg-icon iconClass="moneybag"></svg-icon>
          </dt>
          <dd>
            <span  @click="$router.push('/harea')">我的地址</span>
            <svg-icon iconClass="right"/>
          </dd>
        </dl>
      </div>
    </main>
  </div>
</template>
<script>
export default {
  methods: {
    jump(route){
      this.$router.push(route)
    }
  },
}
</script>
<style lang="scss" scoped>
@import '../../assets/css/style.scss';
.my {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  header {
    width: 100%;
    height: px2rem(50);
    background: #fa7753;
    font-size: $titleSize;
    color: #fff;
    display: flex;
    justify-content: space-between;
    line-height: px2rem(50);
    padding: 0 px2rem(10);
  }
  main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: px2rem(30);
    .my_main {
      width: px2rem(352);
      height: px2rem(180);
      background: linear-gradient(to right, #f63635, #f8612c);
      margin: px2rem(15) auto;
      border-radius: px2rem(20);
      padding: px2rem(20);
      position: relative;
      .my_main_top {
        width: 100%;
        height: 50%;
        display: flex;
        dt {
          background: #000;
          width: px2rem(60);
          height: px2rem(60);
          border-radius: 50%;
          overflow: hidden;
          position: relative;
          img {
            height: px2rem(50);
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
          }
        }
        dd {
          margin: 0 px2rem(10);
          font-size: px2rem(16);
          height: 100%;
          color: #fff;
          line-height: px2rem(25);
        }
      }
      .my_main_bottom {
        width: 100%;
        height: 50%;
        display: flex;
        margin-top: px2rem(10);
        justify-content: space-between;
        .item {
          width: 30%;
          height: 100%;
          padding: px2rem(10);
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          text-align: center;
          color: #fff;
          span {
            font-size: px2rem(16);
          }
          p {
            font-size: px2rem(14);
          }
        }
      }
      .qd {
        font-size: px2rem(16);
        padding: px2rem(10) px2rem(25);
        background: #f8d441;
        color: #796217;
        border-radius: 45% 0 0 45%;
        position: absolute;
        right: px2rem(-5);
        top: 20%;
      }
    }
    .dd_center {
      width: 100%;
      background: #fff;
      .dd_center_top {
        height: px2rem(40);
        font-size: px2rem(16);
        display: flex;
        justify-content: space-between;
        padding: 0 px2rem(10);
        align-items: center;
        border-bottom: px2rem(1) solid #eee;
      }
      .dd_center_bottom {
        height: px2rem(80);
        display: flex;
        justify-content: space-around;
        padding: 0 px2rem(15);
        dl {
          width: 20%;
          height: 100%;
          padding: px2rem(10) 0;
          display: flex;
          justify-content: space-between;
          flex-direction: column;
          dt {
            font-size: px2rem(25);
            width: px2rem(25);
            height: px2rem(25);
            margin: 0 auto;
            color: #f8542f;
          }
          dd {
            font-size: px2rem(16);
            text-align: center;
          color: #7a7a7a;
          }
        }
      }
    }
    .img {
      width: 100%;
      height: px2rem(85);
      background: #eee;
      margin: px2rem(15) 0;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .item_router {
      width: 100%;
      height: px2rem(45);
      line-height: px2rem(45);
      background: #fff;
      padding: 0 pxrem(15);
       touch-action: none; 
      dl {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: space-between;
        font-size: px2rem(16);
        dt {
          width: px2rem(45);
          height: 100%;
          margin-left: px2rem(15);
          line-height: px2rem(45);
          font-size: px2rem(25);
        }
        dd {
          width: 100%;
          margin-left: px2rem(10);
          border-bottom: px2rem(1) solid #ccc;
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-right: px2rem(15);
          color: #262626;
        }
      }
    }
  }
}
</style>
